/*
 * Copyright 2008-2009 Aying.Net Powered by Fuchun.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.aying.media.audio;

/**
 * {@code AudioFormat} 提供音频的格式类型枚举。
 * <p />
 * 目前只支持 <code>wav、wma、mp3 和 mid</code> 格式。
 * 
 * @author Fuchun
 * @version 1.0, 2009-07-20
 */
public enum AudioFormat {

    /**
     * {@code WAV} 是微软公司开发的一种无损声音文件格式。
     */
    WAV("wav"),
    
    /**
     * Windows Media Audio，微软公司开发的一种声音文件格式。
     */
    WMA("wma"),

    /**
     * MPEG Audio Layer3，{@code MPEG} 标准中的音频部分。
     */
    MP3("mp3"),
    
    /**
     * Musical Instrument Digital Interface。
     */
    MIDI("mid");

    final String format;

    AudioFormat(String format) {
        this.format = format;
    }

    /**
     * @see java.lang.Enum#toString()
     */
    public String toString() {
        return format;
    }
}
